﻿namespace RL
{
    
    using System;
    using System.Web.Configuration;

    internal class WebsitePaths : ExtensionBase, IExtension
    {
        private string LocalSlash = @"\";
        private RL.AjaxPlaceHolder Manager;
        private string webSlash = "/";

        internal WebsitePaths(RL.AjaxPlaceHolder manager)
        {
            this.Manager = manager;
        }

        public string ResourcesDirectory
        {
            get
            {
							return string.Format("{0}{1}",
								this.WebsiteName.EnsureWebSlashInTheEnd(),
								this.Manager.ResourceDirectory);
            }
        }

        public string ResourcesDirectorySlash
        {
            get
            {
                return (this.ResourcesDirectory + this.webSlash);
            }
        }

        public string WebsiteName
        {
            get
            {
                return WebConfigurationManager.AppSettings["WebsiteName"].ToString().Trim();
            }
        }

        public string WebsiteNameSlash
        {
            get
            {
                return (this.WebsiteName + this.webSlash);
            }
        }
    }
}

